package de.metalcon.gwt.client.rpc;

import com.google.gwt.user.client.rpc.AsyncCallback;

import de.metalcon.gwt.shared.ContentTransmitter;

public abstract class AsyncTransmitterCallback<T extends ContentTransmitter> implements AsyncCallback<T> {
	@Override
	public void onSuccess(T result) {
		if (result != null) {
			ContentTransmitterHandler.updateTransmitter((ContentTransmitter) result);
		}
		this.afterSuccess(result);
	}

	public abstract void afterSuccess(T result);
}